<template>
  <div class="box">
      <div class="header">
          <router-link class="Link-Tab" to="/home">首页</router-link>
          <router-link class="Link-Tab" to="/commodity">商品</router-link>
          <router-link class="Link-Tab" to="/order">订单</router-link>
          <router-link class="Link-Tab" to="/inventory">库存</router-link>
          <router-link class="Link-Tab" to="/user">用户</router-link>
          <router-link class="Link-Tab" to="/promotion">促销</router-link>
          <router-link class="Link-Tab" to="/freight">运营</router-link>
          <router-link class="Link-Tab" to="/content">内容</router-link>
          <router-link class="Link-Tab" to="/statistics">统计</router-link>
          <router-link class="Link-Tab" to="/finance">财务</router-link>
          <router-link class="Link-Tab" to="/est">设置</router-link>
          <router-link class="Link-Tab" to="/jurisdiction">权限</router-link>
          <a class="Link-go" href="javascripj:;"><Icon type="ios-contact" class="iconfont" /></a>
          <a class="Link-go" href="javascripj:;"><Icon type="md-home" class="iconfont" /></a>
          <a class="Link-go" href="javascripj:;"><Icon type="md-list" class="iconfont" /></a>
          <a class="Link-go" href="javascripj:;"><Icon type="md-notifications" class="iconfont" /></a>
          <a class="Link-go" href="javascripj:;"><Icon type="logo-sass" class="iconfont" /></a>
          <a class="Link-go" href="javascripj:;"><Icon type="md-power" class="iconfont" /></a>
      </div>
      <div class="body">
        <div class="Index-box-left">
            <p v-for="(item,index) in list" :key="index">{{item.title}}</p>
        </div>
        <div class="Index-box-right">
          <router-view></router-view>
        </div>
      </div>
      <div class="footer"></div>
  </div>
</template>

<script>
import axios from 'axios';
export default {
   data() {
       return {
           list:[],
       }
   },
   created() {
       axios.post("/api/getList").then(res => {
           this.list = res.data.list
       })
   },
   methods: {
       
   },
}
</script>

<style>
*{
    margin: 0;
    padding: 0;
    list-style: none;
    box-sizing: border-box;
}
html,body{
    width: 100%;
    height: 100%;
}
.iconfont{
    color: #ffffff;
    font-size: 20px;
}
.Link-go{
    display: inline-block;
    width: 30px;
    border-right: 1px solid #000;
}
.box{
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.header{
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: #595e6c;
    border-bottom: 1px solid #cccccc;
}
.Link-Tab{
    color: #ffffff;
    text-decoration: none;
}
.body{
    flex: 1;
    height: 100%;
    display:flex;
    overflow-y: auto;
}
.Index-box-left{
    width: 15%;
    height: auto;
    overflow-y: auto;
    border-right: 1px solid #cccccc;
    background: #eaedf1;
}
.Index-box-left>p{
    width: 100%;
    height: 40px;
    text-align: center;
    line-height: 40px;
    border-bottom: 1px solid #cccccc;
}
.active{
    color: springgreen;
    background: #ffffff;
}
.Index-box-right{
    flex: 1;
}
.footer{
    width: 100%;
    height: 70px;
    border-top:1px solid #cccccc;
}
</style>